package com.zhang.learn.spring;

import com.zhang.learn.spring.beans.A;
import com.zhang.learn.spring.beans.B;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author zhanghaolian
 * @date 2021/5/27 23:40
 */
public class SpringFrameWorkLearn {
    /**
     * 测试sping中的循环引用
     */
    @Test
    public void testCircleReference() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.register(A.class, B.class);
        context.refresh();

        ClassPathXmlApplicationContext xmlApplicationContext = new ClassPathXmlApplicationContext("application-context.xml");
        System.out.println("ok");
    }
}
